Current File : //usr/lib/python3/dist-packages/boto3/__pycache__/session.cpython-312.pyc
�

��eQ��x�ddlZddlZddlZddlmZddlmZmZddl	Z	ddl
Z	ddlmZm
Z
ddlmZGd�d�Zy)	�N)�Config)�DataNotFoundError�UnknownServiceError)�ResourceNotExistsError�UnknownAPIVersionError�)�ResourceFactoryc���eZdZdZ						dd�Zd�Zed��Zed��Zed��Z	ed��Z
d	�Zd
�Zd�Z
d�Z	dd
�Zd�Zd�Z									dd�Z									dd�Zd�Zy)�Sessiona/
    A session stores configuration state and allows you to create service
    clients and resources.

    :type aws_access_key_id: string
    :param aws_access_key_id: AWS access key ID
    :type aws_secret_access_key: string
    :param aws_secret_access_key: AWS secret access key
    :type aws_session_token: string
    :param aws_session_token: AWS temporary session token
    :type region_name: string
    :param region_name: Default region when creating new connections
    :type botocore_session: botocore.session.Session
    :param botocore_session: Use this Botocore session instead of creating
                             a new default one.
    :type profile_name: string
    :param profile_name: The name of a profile to use. If not given, then
                         the default profile is used.
    Nc��|�||_n#tjj�|_|jjdk(r�dj|jj�}|jjr#|jxjd|zz
c_n||j_d|j_tj|j_|�|jjd|�|s|s|r|jj|||�|�|jjd|�t|jjd��|_|j�|j!�y)N�BotocorezBotocore/{}� �Boto3�profile�region�
event_emitter)�_session�botocore�session�get_session�user_agent_name�format�user_agent_version�user_agent_extra�boto3�__version__�set_config_variable�set_credentialsr	�
get_component�resource_factory�
_setup_loader�_register_default_handlers)�self�aws_access_key_id�aws_secret_access_key�aws_session_token�region_name�botocore_session�profile_name�
botocore_infos        �//usr/lib/python3/dist-packages/boto3/session.py�__init__zSession.__init__1s@���'�,�D�M�%�,�,�8�8�:�D�M��=�=�(�(�J�6�)�0�0��
�
�0�0��M��}�}�-�-��
�
�.�.�#�
�2E�E�.�1>��
�
�.�,3�D�M�M�)�/4�/@�/@�D�M�M�,��#��M�M�-�-�i��F�� 5�9J��M�M�)�)�!�#8�:K�
��"��M�M�-�-�h��D� /��M�M�'�'��8�!
���	
�����'�'�)�c��dj|jjt|jjd���S)Nz{}(region_name={})r)r�	__class__�__name__�reprr�get_config_variable�r#s r+�__repr__zSession.__repr__]s9��#�*�*��N�N�#�#�����2�2�8�<�=�
�	
r-c�6�|jjxsdS)z1
        The **read-only** profile name.
        �default)rrr3s r+r)zSession.profile_namecs��
�}�}�$�$�1�	�1r-c�8�|jjd�S)z0
        The **read-only** region name.
        r)rr2r3s r+r'zSession.region_namejs��
�}�}�0�0��:�:r-c�8�|jjd�S)z1
        The event emitter for a session
        r)rrr3s r+�eventszSession.eventsqs��
�}�}�*�*�?�;�;r-c�.�|jjS)zC
        The profiles available to the session credentials
        )r�available_profilesr3s r+r;zSession.available_profilesxs��
�}�}�/�/�/r-c��|jjd�|_|jjj	t
jjt
jjt�d��y)zC
        Setup loader paths so that we can load resources.
        �data_loader�dataN)
rr�_loader�search_paths�append�os�path�join�dirname�__file__r3s r+r!zSession._setup_loadersQ���}�}�2�2�=�A������!�!�(�(��G�G�L�L�������2�F�;�	
r-c�6�|jj�S)z�
        Get a list of available services that can be loaded as low-level
        clients via :py:meth:`Session.client`.

        :rtype: list
        :return: List of service names
        )r�get_available_servicesr3s r+rHzSession.get_available_services�s���}�}�3�3�5�5r-c�:�|jjd��S)z�
        Get a list of available services that can be loaded as resource
        clients via :py:meth:`Session.resource`.

        :rtype: list
        :return: List of service names
        �resources-1)�	type_name)r?�list_available_servicesr3s r+�get_available_resourceszSession.get_available_resources�s���|�|�3�3�m�3�L�Lr-c�6�|jj�S)z�Lists the available partitions

        :rtype: list
        :return: Returns a list of partition names (e.g., ["aws", "aws-cn"])
        )r�get_available_partitionsr3s r+rOz Session.get_available_partitions�s���}�}�5�5�7�7r-c�>�|jj|||��S)a�Lists the region and endpoint names of a particular partition.

        The list of regions returned by this method are regions that are
        explicitly known by the client to exist and is not comprehensive. A
        region not returned in this list may still be available for the
        provided service.

        :type service_name: string
        :param service_name: Name of a service to list endpoint for (e.g., s3).

        :type partition_name: string
        :param partition_name: Name of the partition to limit endpoints to.
            (e.g., aws for the public AWS endpoints, aws-cn for AWS China
            endpoints, aws-us-gov for AWS GovCloud (US) Endpoints, etc.)

        :type allow_non_regional: bool
        :param allow_non_regional: Set to True to include endpoints that are
             not regional endpoints (e.g., s3-external-1,
             fips-us-gov-west-1, etc).

        :return: Returns a list of endpoint names (e.g., ["us-east-1"]).
        )�service_name�partition_name�allow_non_regional)r�get_available_regions)r#rQrRrSs    r+rTzSession.get_available_regions�s)��2�}�}�2�2�%�)�1�3�
�	
r-c�6�|jj�S)a%
        Return the :class:`botocore.credentials.Credentials` object
        associated with this session.  If the credentials have not
        yet been loaded, this will attempt to load them.  If they
        have already been loaded, this will return the cached
        credentials.
        )r�get_credentialsr3s r+rVzSession.get_credentials�s���}�}�,�,�.�.r-c�8�|jj|�S)aLists the partition name of a particular region.

        :type region_name: string
        :param region_name: Name of the region to list partition for (e.g.,
             us-east-1).

        :rtype: string
        :return: Returns the respective partition name (e.g., aws).
        )r�get_partition_for_region)r#r's  r+rXz Session.get_partition_for_region�s���}�}�5�5�k�B�Br-c�L�|jj|||||||||	|
��
S)a�
        Create a low-level service client by name.

        :type service_name: string
        :param service_name: The name of a service, e.g. 's3' or 'ec2'. You
            can get a list of available services via
            :py:meth:`get_available_services`.

        :type region_name: string
        :param region_name: The name of the region associated with the client.
            A client is associated with a single region.

        :type api_version: string
        :param api_version: The API version to use.  By default, botocore will
            use the latest API version when creating a client.  You only need
            to specify this parameter if you want to use a previous API version
            of the client.

        :type use_ssl: boolean
        :param use_ssl: Whether or not to use SSL.  By default, SSL is used.
            Note that not all services support non-ssl connections.

        :type verify: boolean/string
        :param verify: Whether or not to verify SSL certificates.  By default
            SSL certificates are verified.  You can provide the following
            values:

            * False - do not validate SSL certificates.  SSL will still be
              used (unless use_ssl is False), but SSL certificates
              will not be verified.
            * path/to/cert/bundle.pem - A filename of the CA cert bundle to
              uses.  You can specify this argument if you want to use a
              different CA cert bundle than the one used by botocore.

        :type endpoint_url: string
        :param endpoint_url: The complete URL to use for the constructed
            client. Normally, botocore will automatically construct the
            appropriate URL to use when communicating with a service.  You
            can specify a complete URL (including the "http/https" scheme)
            to override this behavior.  If this value is provided,
            then ``use_ssl`` is ignored.

        :type aws_access_key_id: string
        :param aws_access_key_id: The access key to use when creating
            the client.  This is entirely optional, and if not provided,
            the credentials configured for the session will automatically
            be used.  You only need to provide this argument if you want
            to override the credentials used for this specific client.

        :type aws_secret_access_key: string
        :param aws_secret_access_key: The secret key to use when creating
            the client.  Same semantics as aws_access_key_id above.

        :type aws_session_token: string
        :param aws_session_token: The session token to use when creating
            the client.  Same semantics as aws_access_key_id above.

        :type config: botocore.client.Config
        :param config: Advanced client configuration options. If region_name
            is specified in the client config, its value will take precedence
            over environment variables and configuration values, but not over
            a region_name value passed explicitly to the method. See
            `botocore config documentation
            <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html>`_
            for more details.

        :return: Service client instance

        �	r'�api_version�use_ssl�verify�endpoint_urlr$r%r&�config)r�
create_client)r#rQr'r[r\r]r^r$r%r&r_s           r+�clientzSession.client�s?��d�}�}�*�*��#�#���%�/�"7�/��+�
�	
r-c�4�	|jj|d|�}|�|jj|d�}|
�)|
j�)tj|
�}
d|
_ntd��}
|j|||||||||	|
��
}|j j"}t$j&j)|||dt$j&j+|j,||���}|j.j1||d|�	�}||�
�S#t$r0|j�}||j	�v}
t|||
��t$r9|jj|d�}t||dj|���wxYw)a�

        Create a resource service client by name.

        :type service_name: string
        :param service_name: The name of a service, e.g. 's3' or 'ec2'. You
            can get a list of available services via
            :py:meth:`get_available_resources`.

        :type region_name: string
        :param region_name: The name of the region associated with the client.
            A client is associated with a single region.

        :type api_version: string
        :param api_version: The API version to use.  By default, botocore will
            use the latest API version when creating a client.  You only need
            to specify this parameter if you want to use a previous API version
            of the client.

        :type use_ssl: boolean
        :param use_ssl: Whether or not to use SSL.  By default, SSL is used.
            Note that not all services support non-ssl connections.

        :type verify: boolean/string
        :param verify: Whether or not to verify SSL certificates.  By default
            SSL certificates are verified.  You can provide the following
            values:

            * False - do not validate SSL certificates.  SSL will still be
              used (unless use_ssl is False), but SSL certificates
              will not be verified.
            * path/to/cert/bundle.pem - A filename of the CA cert bundle to
              uses.  You can specify this argument if you want to use a
              different CA cert bundle than the one used by botocore.

        :type endpoint_url: string
        :param endpoint_url: The complete URL to use for the constructed
            client. Normally, botocore will automatically construct the
            appropriate URL to use when communicating with a service.  You
            can specify a complete URL (including the "http/https" scheme)
            to override this behavior.  If this value is provided,
            then ``use_ssl`` is ignored.

        :type aws_access_key_id: string
        :param aws_access_key_id: The access key to use when creating
            the client.  This is entirely optional, and if not provided,
            the credentials configured for the session will automatically
            be used.  You only need to provide this argument if you want
            to override the credentials used for this specific client.

        :type aws_secret_access_key: string
        :param aws_secret_access_key: The secret key to use when creating
            the client.  Same semantics as aws_access_key_id above.

        :type aws_session_token: string
        :param aws_session_token: The session token to use when creating
            the client.  Same semantics as aws_access_key_id above.

        :type config: botocore.client.Config
        :param config: Advanced client configuration options. If region_name
            is specified in the client config, its value will take precedence
            over environment variables and configuration values, but not over
            a region_name value passed explicitly to the method.  If
            user_agent_extra is specified in the client config, it overrides
            the default user_agent_extra provided by the resource API. See
            `botocore config documentation
            <https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html>`_
            for more details.

        :return: Subclass of :py:class:`~boto3.resources.base.ServiceResource`
        rJz, �Resource)rrZ�	resources)rQ�
service_model�resource_json_definitions�service_waiter_model�service)�
resource_name�single_resource_json_definition�service_context)ra)r?�load_service_modelrrMrHrr�list_api_versionsrrD�determine_latest_versionr�copy�deepcopyrra�metarer�utils�ServiceContext�LazyLoadedWaiterModelrr �load_from_definition)r#rQr'r[r\r]r^r$r%r&r_�resource_model�	available�has_low_level_client�available_api_versionsrarerk�clss                   r+�resourcezSession.resource8s���f	�!�\�\�<�<��m�[��N�(�� �,�,�?�?��m��K����&�&�.����v�.��*4��'��Z�8�F�����#�#���%�/�"7�/���
�����1�1�
� �+�+�4�4�%�'�&4�[�&A�!&���!B�!B��
�
�|�[�"�	5�
���#�#�8�8�&�,:�9�,E�+�9�
���&�!�!��_#�	��4�4�6�I��� ;� ;� =�=�
!�)��i�)=��
�!�	�%)�\�\�%C�%C��m�&�"�)��k�4�9�9�5K�+L��
�	�s�D�A9Fc��|jjdtjj	d��|jjdtjj	d��|jjdtjj	d��|jjdtjj	d��|jjd	tjj	d
�d��|jjd
tjj	d�d��|jjdtjj	d��|jjdtjj	d|j
���y)Nzcreating-client-class.s3z*boto3.s3.inject.inject_s3_transfer_methodsz!creating-resource-class.s3.Bucketz%boto3.s3.inject.inject_bucket_methodsz!creating-resource-class.s3.Objectz%boto3.s3.inject.inject_object_methodsz(creating-resource-class.s3.ObjectSummaryz-boto3.s3.inject.inject_object_summary_methodsz creating-resource-class.dynamodbz6boto3.dynamodb.transform.register_high_level_interfacezhigh-level-dynamodb)�	unique_idz&creating-resource-class.dynamodb.Tablez+boto3.dynamodb.table.register_table_methodszhigh-level-dynamodb-tablez+creating-resource-class.ec2.ServiceResourcez'boto3.ec2.createtags.inject_create_tagsz$creating-resource-class.ec2.Instancez'boto3.ec2.deletetags.inject_delete_tags)r)r�registerrrr�	lazy_callr9r3s r+r"z"Session._register_default_handlers�sz���
�
���&��K�K�!�!�<�
�	
�	
�
�
���/��K�K�!�!�"I�J�	
�	
�
�
���/��K�K�!�!�"I�J�	
�	
�
�
���6��K�K�!�!�?�
�	
�	
�
�
���.��K�K�!�!�H�
�,�	�	
�	
�
�
���4��K�K�!�!�=�
�2�	�	
�	
�
�
���9��K�K�!�!�"K�L�	
�
	
�
�
���2��K�K�!�!�9�"�k�k�
"�
�	
r-)NNNNNN)�awsF)	NNTNNNNNN)r0�
__module__�__qualname__�__doc__r,r4�propertyr)r'r9r;r!rHrMrOrTrVrXrar{r"�r-r+rrs����,�"�����**�X
��2��2��;��;��<��<��0��0�
�6�M�8�FK�
�>/�
C�������"���]
�D������"���f"�P3
r-r)rorB�botocore.sessionr�botocore.clientr�botocore.exceptionsrrr�boto3.utils�boto3.exceptionsrr�resources.factoryr	rr�r-r+�<module>r�s.���	��"�F���K�.�w
�w
r-
Page Not Found
Parece que el enlace que apuntaba aquí no sirve. ¿Quieres probar con una búsqueda?
¡Hola!